<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="${path}/res/app/css/mes.css">
<script type="text/javascript" src="${path}/cms/js/jquery-1.8.3.min.js"></script>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>农产品质量安全追溯系统--种植详情</title>
</head>
<body>
<div class="topBox" id="topBox">
    <p>${plant.cropName }</p>
    <p>所属园区：${plant.parkName }</p>
    <p>所属大棚：${plant.blockName }</p>
    <c:if test="${plant.plantType == 1 }">
    <p>种植时间：<fmt:formatDate value="${plant.beginTime }" pattern="yyyy-MM-dd"/></p>
    </c:if>
    <c:if test="${plant.plantType == 2 }">
    <p>养殖时间：<fmt:formatDate value="${plant.beginTime }" pattern="yyyy-MM-dd"/></p>
    </c:if>
</div>
<ul class="content" id="content">
    <li>
        <span>环节</span>
        <span>所属过程</span>
        <span>作业时间</span>
    </li>
    <c:forEach items="${proRecordList }" var="proRecord">
	    <li>
	        <span>${proRecord.linkName }</span>
	        <span>
	        	<c:if test="${proRecord.linkType == 0 }">基本环节</c:if>
	        	<c:if test="${proRecord.linkType == 1 }">播种环节</c:if>
	        	<c:if test="${proRecord.linkType == 2 }">施肥环节</c:if>
	        	<c:if test="${proRecord.linkType == 3 }">植保环节</c:if>
	        	<c:if test="${proRecord.linkType == 4 }">收获环节</c:if>
	        </span>
	        <span><fmt:formatDate value="${proRecord.workdate }" pattern="yyyy-MM-dd"/></span>
	        <span style="cursor:pointer" onclick="jump('${proRecord.recordid}','${plant.plantid}');">详情</span>
	    </li>
    </c:forEach>
</ul>
<script type="text/javascript">
function jump(recordid,plantid){
	window.open("${path}/api/app/linkDetail.do?recordid="+recordid+"&plantid="+plantid,"_blank");
}
</script>
</body>
</html>